﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Text.Json.Serialization;

namespace GanFeng.Forest.WebApi.Objects
{
    /// <summary>
    /// MES 配方结果明细
    /// </summary>
    public class MesRecipeResultDetail
    {
        /// <summary>
        /// 工步序号
        /// </summary>
        [JsonPropertyName("step_serial_number")]
        public int StepSerialNumber { get; set; }

        /// <summary>
        /// 原材料码
        /// </summary>
        /// <remarks>
        /// <list type="table">
        /// <listheader><term>正极</term><description></description></listheader>
        /// <item><term>0</term><description>无</description></item>
        /// <item><term>1</term><description>主粉</description></item>
        /// <item><term>3</term><description>SP 粉</description></item>
        /// <item><term>4</term><description>三元 CNT</description></item>
        /// <item><term>5</term><description>PVDF</description></item>
        /// <item><term>6</term><description>胶液</description></item>
        /// <item><term>7</term><description>NMP_喷淋</description></item>
        /// <item><term>8</term><description>NMP_加液</description></item>
        /// <item><term>9</term><description>非三元 CNT</description></item>
        /// <item><term>9</term><description>CNT 原料</description></item>
        /// <item><term>15</term><description>FRL PVDF</description></item>
        /// <item><term>16</term><description>FRL 勃姆石</description></item>
        /// <item><term>17</term><description>PVDF1粉料</description></item>
        /// <item><term>18</term><description>PVDF2粉料</description></item>
        /// </list>
        /// <list type="table">
        /// <listheader><term>负极</term><description></description></listheader>
        /// <item><term>0</term><description>无</description></item>
        /// <item><term>1</term><description>主粉</description></item>
        /// <item><term>2</term><description>SBR</description></item>
        /// <item><term>3</term><description>SP</description></item>
        /// <item><term>5</term><description>CMC</description></item>
        /// <item><term>7</term><description>DIW 喷淋</description></item>
        /// <item><term>8</term><description>DIW 加液</description></item>
        /// <item><term>9</term><description>LA133 胶液</description></item>
        /// <item><term>10</term><description>去离子水（热）</description></item>
        /// <item><term>11</term><description>EC</description></item>
        /// <item><term>12</term><description>LA133 原料</description></item>
        ///</list>
        /// </remarks>
        [JsonPropertyName("material_code")]
        public short MaterialCode { get; set; }
        /// <summary>
        /// 原材料重量（KG）
        /// </summary>
        [JsonPropertyName("material_weight")]
        public float MaterialWeight { get; set; }
        /// <summary>
        /// 分散转速设定（rpm）
        /// </summary>
        [JsonPropertyName("scattered_rotate_speed")]
        public short ScatteredRotateSpeed { get; set; }
        /// <summary>
        /// 搅拌转速设定（rpm）
        /// </summary>
        [JsonPropertyName("stir_rotate_speed")]
        public short StirRotateSpeed { get; set; }
        /// <summary>
        /// 运行时间设定（分钟）
        /// </summary>
        [JsonPropertyName("elapsed_time")]
        public short ElapsedTime { get; set; }
        /// <summary>
        /// 真空设定（Mpa）
        /// </summary>
        [JsonPropertyName("vacuum")]
        public float Vacuum { get; set; }
        /// <summary>
        /// 温度设定
        /// </summary>
        [JsonPropertyName("temperature")]
        public float Temperature { get; set; }
        /// <summary>
        /// 搅拌方向是否反转。True: 反转；false: 正转
        /// </summary>
        /// <remarks>
        /// True: 反转；false: 正转
        /// </remarks>
        [JsonPropertyName("stir_direction")]
        public bool StirDirectionIsReverse { get; set; }
        /// <summary>
        /// 功能码
        /// </summary>
        /// <remarks>
        /// <list type="table">
        /// <item><term>0</term><description>结束确认</description></item>
        /// <item><term>1</term><description>自动下步</description></item>
        /// <item><term>2</term><description>慢速搅拌</description></item>
        /// </list>
        /// </remarks>
        [JsonPropertyName("function_code")]
        public short FunctionCode { get; set; }
        /// <summary>
        /// 配方结束码
        /// </summary>
        /// <remarks>
        /// 如果为 true，即使后续有设定工步，也不会再执行
        /// </remarks>
        [JsonPropertyName("end_symbol")]
        public bool EndSymbol { get; set; }
        /// <summary>
        /// 重量公差上限（KG）
        /// </summary>
        [JsonPropertyName("material_weight_tolerance_upperlimit")]
        public float MaterialWeightToleranceUpperlimit { get; set; }
        /// <summary>
        /// 重量公差下限（KG）
        /// </summary>
        [JsonPropertyName("material_weight_tolerance_lowlimit")]
        public float MaterialWeightToleranceLowlimit { get; set; }
        ///// <summary>
        ///// 原材料实际重量（KG）
        ///// </summary>
        //[JsonPropertyName("material_actual_weight")]
        //public float MaterialActualWeight { get; set; }
        ///// <summary>
        ///// 工步开始时间
        ///// </summary>
        //[JsonPropertyName("step_start_time")]
        //public string StepStartTime { get; set; } = string.Empty;
        ///// <summary>
        ///// 工步结束时间
        ///// </summary>
        //[JsonPropertyName("step_end_time")]
        //public string StepEndTime { get; set; } = string.Empty;

    }
}
